package com.service;

import com.mapper.UserMapper;
import com.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @CreateTime: 2022-12-19  17:36
 * @Description: TODO
 * @Version: 1.0.0
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    // 新增
    @Override
    public Object insert(User user) {
        return userMapper.insert(user);
    }

    // 更新
    @Override
    public Object update(User user) {
        return userMapper.update(user);
    }

    // 根据主键 id 查询
    @Override
    public User load(String username) {
        return userMapper.load(username);
    }

}
